Skip to content

MovieForm - Iulia#13

Open
iiiulia12 wants to merge 5 commits intomasterfrom
MovieForm-Iulia
Open

MovieForm - Iulia#13
iiiulia12 wants to merge 5 commits intomasterfrom
MovieForm-Iulia

Conversation

@iiiulia12
Copy link
Copy Markdown
Collaborator

No description provided.

 -  Add logic to check if a movie with the same title and genre ID already exists
 - Display error message
<p>This is movie name: {data.name}</p>
</div>}
</>
function handleMovieSubmit(data) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is just a renaming of the mutate function. This could be done where we have the useMutation like this:

const { mutate: handleMovieSubmit, data, isSuccess, isError, error } = useMutation({})

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed the mutate func

Copy link
Copy Markdown
Owner

@OctaFloare OctaFloare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and clean. Good job extracting the formField and adding validation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants